package net.zjitc.service;

import net.zjitc.common.ServiceResponse;
import net.zjitc.pojo.Category;
import net.zjitc.pojo.Condition;
import net.zjitc.pojo.Product;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Author: KingCc
 * @Date: 2019/6/1 18:29
 */
public interface ProductService {
    List<Product> findAllProduct();

    List<Category> findAllCategory();

    ServiceResponse addProduct(Product product, MultipartFile file, HttpServletRequest request);

    Product findProductById(String id);

    ServiceResponse editProduct(Product product, MultipartFile file, HttpServletRequest request);

    int deleteProduct(String id);

    List<Product> searchByCondition(Condition condition);

    List<Product> findProductByCid(Integer id);

    Category findCategoryById(Integer id);
}
